import Request from'../utils/request.js'
export const findAllUser = ()=>{

    return Request.get('/system/admins/all')
}


//删除用户
export const deleteUser = (id)=>{
    return Request.delete(`/system/admins/delete?id=${id}`)
}
//查询所有管理员
export const findAllAdmin = ()=>{
    return Request.get('/system/admins/search')
}
//修改信息
export const updateUser = (data)=>{
    return Request.put('/system/admins/update',data)
}
//删除管理员
export const deleteAdmin = (id)=>{
    return Request.delete(`/system/admins/deleteAdmin?id=${id}`)
}
//查询所有宠物
export const findAllPet = ()=>{
    return Request.get('/system/admins/allPets')
}
//查询所有公告
export const findAllNotice = ()=>{
    return Request.get('/system/admins/allMessages')
}
//修改公告
export const updateMessage = (bells)=>{
    console.log(bells)
    return Request.put('/system/admins/updateMessage',bells)
}
//删除
export const deleteMessage = (id)=>{
    return Request.delete(`/system/admins/deleteMessage?id=${id}`)
}

//获取所有留言
export const findAllMessage = ()=>{
    return Request.get('/system/messages/all')
}
//删除留言
export const deleteMessage1 = (id)=>{
    return Request.delete(`/system/messages/delete?id=${id}`)
}
//获取所有活动
export const findAllActivity = ()=>{
    return Request.get('/system/activity/all')
}
//编辑
export const updateActivity = (data)=>{
    console.log("111111111111111")
    console.log(data)
    return Request.post('/system/activity/edit',data)
}
//删除1
export const deleteActivity = (id)=>{
    return Request.delete(`/system/activity/delete?id=${id}`)
}
//查询所有丢失的宠物
export const findAllLost = ()=>{
    return Request.get('/system/losspets/all')
}
//删除
export const deleteLost = (id)=>{
    return Request.delete(`/system/losspets/delete?id=${id}`)
}
//获取所有社区铁汁
export const findAllCommunity = ()=>{
    return Request.get('/system/community/all')
}
//删除
export const deleteCommunity = (id)=>{
    return Request.delete(`/system/community/delete?id=${id}`)
}
//获取所有待领取
export const findAllReceive = ()=>{
    return Request.get('/system/adminsPet/all')
}

//修改状态
export const updateStatus = (data)=>{
    console.log(data)
    return Request.post(`/system/adminsPet/update?id=${data.id}&status=${data.status}`)
}
//删除宠物
export const deletePet = (id)=>{
    console.log(id)
    return Request.delete(`/system/pets/delete?id=${id}`)
}


export const addMessage = (data)=>{
    console.log(data)
    return Request.post('/system/bells/add',data)
}

//添加管理员
export const addAdmin = (data)=>{
    console.log(data)
    return Request.post('/system/admins/add',data)
}

//添加活动
 export const addActivity = (data)=>{
    console.log(data)
    return Request.post('/system/activity/add',data)
}

//模糊查询用户
export const findUser = (data)=>{
    console.log(data)
    return Request.get(`/system/admins/searchUser?username=${data}`)
}